package com.mba.adapter;

import com.mba.activity.R;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ContentActivityAdapter extends BaseAdapter {
	private Context context;
	private String[] clickMsg;
	private ImageView pic;
	public ContentActivityAdapter(Context context) {
		this.context = context;
	}
	@Override
	public int getCount() {
		return 2;
	}

	@Override
	public Object getItem(int arg0) {
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		return 0;
	}
	@Override
	public View getView(int position, View arg1, ViewGroup arg2) {
		LinearLayout ll = new LinearLayout(context);
		ll.setOrientation(LinearLayout.HORIZONTAL);
		//LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
		//ll.setLayoutParams(params);
		ll.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.settings_btn_bg_single));
		clickMsg = new String[]{"我收到的回复","我发出的回复"};
		TextView tx = new TextView(context);
		
		tx.setText(clickMsg[position]);
		//可以在这里插入一张图片
		ll.addView(tx);
		return ll;
	}

}
